package com.rfid.service.impl;

import java.util.Date;
import java.util.List;

import com.rfid.tool.ComX;
import gnu.io.NoSuchPortException;
import gnu.io.PortInUseException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rfid.mapper.RfidOrderMapper;
import com.rfid.domain.RfidOrder;
import com.rfid.service.IRfidOrderService;

/**
 * 仓库订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-29
 */
@Service
public class RfidOrderServiceImpl implements IRfidOrderService 
{
    @Autowired
    private RfidOrderMapper rfidOrderMapper;

    /**
     * 查询仓库订单
     * 
     * @param id 仓库订单主键
     * @return 仓库订单
     */
    @Override
    public RfidOrder selectRfidOrderById(Long id)
    {
        return rfidOrderMapper.selectRfidOrderById(id);
    }

    /**
     * 查询仓库订单列表
     * 
     * @param rfidOrder 仓库订单
     * @return 仓库订单
     */
    @Override
    public List<RfidOrder> selectRfidOrderList(RfidOrder rfidOrder)
    {
        return rfidOrderMapper.selectRfidOrderList(rfidOrder);
    }

    /**
     * 新增仓库订单
     * 
     * @param rfidOrder 仓库订单
     * @return 结果
     */
    @Override
    public int insertRfidOrder(RfidOrder rfidOrder)
    {
        rfidOrder.setCreatTime(new Date());
        return rfidOrderMapper.insertRfidOrder(rfidOrder);
    }

    /**
     * 修改仓库订单
     * 
     * @param rfidOrder 仓库订单
     * @return 结果
     */
    @Override
    public int updateRfidOrder(RfidOrder rfidOrder)
    {
        return rfidOrderMapper.updateRfidOrder(rfidOrder);
    }

    /**
     * 批量删除仓库订单
     * 
     * @param ids 需要删除的仓库订单主键
     * @return 结果
     */
    @Override
    public int deleteRfidOrderByIds(Long[] ids)
    {
        return rfidOrderMapper.deleteRfidOrderByIds(ids);
    }

    /**
     * 删除仓库订单信息
     * 
     * @param id 仓库订单主键
     * @return 结果
     */
    @Override
    public int deleteRfidOrderById(Long id)
    {
        return rfidOrderMapper.deleteRfidOrderById(id);
    }
}
